﻿using System.Collections.ObjectModel;
using System.Linq;
using Microsoft.Xna.Framework;

namespace SAM3D
{
    public class CameraManager : Collection<ICamera>, ICameraService
    {
        private int mainIndex = 0;
        public CameraManager(Game game)
        {
            game.Services.AddService(typeof(ICameraService), this);
        }

        public void SetMainCamera(int index)
        {
            mainIndex = index;
        }

        public ICamera GetCamera()
        {
            return this.ElementAt(mainIndex);
        }
    }
}